<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBlanceRecordTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('blance_record', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title')->comment('余额记录标题');
            $table->integer('value')->comment('余额值');
            $table->string('dessc')->comment('余额记录描述');
            $table->string('table_type')->index()->comment('多态表名');
            $table->integer('table_id')->index()->comment('多态主键');
            $table->timestamps();//创建时间
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('blance_record');
    }
}
